// 导入组件
import PageTools from '@/components/PageTools'
import UploadExcel from '@/components/UploadExcel'
import UploadImg from '@/components/UploadImg'
import ImageHolder from '@/components/ImageHolder'
import Lang from '@/components/lang'
import ScreenFull from '@/components/ScreenFull'
// 创建数组，数组中是导入的组件模块
const components = [
  PageTools,
  UploadExcel,
  UploadImg,
  ImageHolder,
  Lang,
  ScreenFull
]
export default ({
  install(Vue) {
    // 对组件模块数组进行遍历，回调函数形参，就是每一个组件库中的组件
    components.forEach(component => {
      // 第一个参数：component.name--声明的组件  name属性，即组件别名
      // 第二个参数：组件具体的逻辑
      Vue.component(component.name, component)
    })
  }
})
